package com.ymatou.iapi.csim.service;

import com.ymatou.iapi.csim.parameter.GetCurrentSessionListResp;
import com.ymatou.iapi.csim.parameter.GetHistorySessionListResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.EnvSetup;
/**
*查询会话列表Call
*FreeMaker Template自动生成代码
*/
public class GetHistorySessionListCall extends YmatouBaseCall{
	private static String opurl ="api/cs/GetHistorySessionList";
	
	public GetHistorySessionListCall() {
		super(EnvSetup.getSystemUrl("csim_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		//client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public GetHistorySessionListResp GetHistorySessionList()
    {
		GetHistorySessionListResp data = null;
        try {
        	//this.getReturnData()
         data = (GetHistorySessionListResp) FormatUtil.GSONToObject(DataUtil.Json.parseJsonObj(this.getString("Result")).toString(), 
        		 GetHistorySessionListResp.class);

        } catch (Exception e) {
            e.printStackTrace();
        }
        return data;
    }
}